#pragma once
#include <d3d9.h>
#include <d3dx9.h>
class FWGame;
class FWTexture;
class FWGraphic
{
private:
	FWGame* _gameObject;	
	LPD3DXSPRITE _d3dxSprite;
	D3DXMATRIX* TransformMatrix;
public:
	FWGraphic(FWGame* game);
	~FWGraphic(void);
	void Begin();
	void Begin(D3DXMATRIX* matrix);
	void End();
	void DrawTexture(FWTexture* texture, D3DXVECTOR3 position,D3DXVECTOR3 center, D3DCOLOR color, float depth);
	void DrawTexture(FWTexture* texture,RECT rect, D3DXVECTOR2 center, D3DCOLOR color,float depth);
	void DrawTexture(FWTexture* texture,RECT srcRect,RECT destRect, D3DXVECTOR2 center, D3DCOLOR color,float depth);
	D3DXVECTOR2 ConvertToGameCoordinate(D3DXVECTOR2 ObjectWorldPosition, D3DXVECTOR2 ObjectCenter);
	void tDrawTexture(FWTexture* texture, D3DXVECTOR3 position,D3DXVECTOR3 center, D3DCOLOR color, float depth);
	void tDrawTexture(FWTexture* texture,RECT rect, D3DXVECTOR2 center, D3DCOLOR color,float depth);
	void tDrawTexture(FWTexture* texture,RECT srcRect,RECT destRect, D3DXVECTOR2 center, D3DCOLOR color,float depth);


};

